/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.emergency.resources.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 应急物资检查表
 *
 * @author cx
 * @date 2023-11-02 11:05:43
 */
@Data
@TableName(value = "er_material_check")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "应急物资检查表")
public class ErMaterialCheckEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;


	/**
	 * 应急物资标识
	 */
	@Schema(description="应急物资标识")
	private Long materialId;
	/**
	* 是否清洁、整齐
	*/
    @Schema(description="是否清洁、整齐")
    private Integer cleanFlag;

	/**
	* 性能是否正常
	*/
    @Schema(description="性能是否正常")
    private Integer performanceFlag;

	/**
	* 数据、型号是否与清单一致
	*/
    @Schema(description="数据、型号是否与清单一致")
    private Integer dataAccordFlag;

	/**
	* 是否在有效期
	*/
    @Schema(description="是否在有效期")
    private Integer validFlag;

	/**
	* 其他内容
	*/
    @Schema(description="其他内容")
    private String otherContent;

	/**
	* 是否存在隐患
	*/
    @Schema(description="是否存在隐患")
    private Integer riskExistFlag;

	/**
	* 完好情况
	*/
    @Schema(description="完好情况")
    private String intactCondition;

	/**
	* 隐患描述
	*/
    @Schema(description="隐患描述")
    private String riskDesc;

	/**
	* 处理记录
	*/
    @Schema(description="处理记录")
    private String handleRecords;

	/**
	* 检查日期
	*/
    @Schema(description="检查日期")
    private LocalDate checkDate;

	/**
	* 下次检查日期
	*/
    @Schema(description="下次检查日期")
    private LocalDate nextCheckDate;

	/**
	* 检查人员
	*/
    @Schema(description="检查人员")
    private String checkMan;

	/**
	* 检查人签字
	*/
    @Schema(description="检查人签字")
    private String checkSignature;

	/**
	 * 机构ID
	 */
	@Schema(description="机构ID")
	private Long orgId;


	public String getCleanFlagStr(){
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getCleanFlag());
	}
	public String getPerformanceFlagStr(){
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getPerformanceFlag());
	}
	public String getDataAccordFlagStr(){
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getDataAccordFlag());
	}
	public String getValidFlagStr(){
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getValidFlag());
	}
	public String getRiskExistFlagStr(){
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getRiskExistFlag());
	}

}